import request from '../utils/request';


/**
 * 获取所有专业信息,包括条件查询接口
 * @param query
 * @returns {AxiosPromise}
 */
export const getSubjectInfo = query =>{
    return request({
        url:'/common/subject/getSubjectInfo',
        method:'get',
        params:query
    })
};
/**
 * 保存专业信息接口
 * @param data
 * @returns {AxiosPromise}
 */
export const saveSubjectInfo = data =>{
    return request({
        url:'/common/subject/saveSubjectInfo',
        method:'post',
        data
    })
};
/**
 * 更新专业信息接口
 * @param data
 * @returns {AxiosPromise}
 */
export const updateSubjectInfo = data =>{
    return request({
        url:'/common/subject/updateSubjectInfo',
        method:'put',
        data
    })
};
/**
 *根据id删除专业信息接口
 * @param id
 * @returns {AxiosPromise}
 */
export const delSubjectInfo = id =>{
    return request({
        url:'/common/subject/delSubjectInfo',
        method:'delete',
        params:{id:id}
    })
};
/**
 * 根据id集合批量删除专业信息接口
 * @param id
 * @returns {AxiosPromise}
 */
export const delBatchSubjectInfo = id =>{
    return request({
        url:'/common/subject/delBatchSubjectInfo',
        method:'delete',
        params:{idList:id}
    })
};


